Skip to main content
  1. Writing/

New PowerToys Awake Release With Tray Improvements

·528 words
Table of Contents

PowerToys 0.87.1 dropped today, and with it (well, technically one point release before), a new PowerToys Awake dropped as well.

If you’d rather skip my outline and get into the weeds of how the latest PowerToys Awake works, I recorded a video just for you:

You might remember that in July I launched a significantly revamped version of PowerToys Awake that introduced icons in the tray that change with the state of the application. Thanks to some very active and vocal users who tested it and opened GitHub issues for a few interesting bugs, I’ve released an update that is now much more stable and reliable.

The new build #

The latest version of PowerToys Awake is codenamed TILLSON_11272024 (you can see all previous released in the changelog on GitHub). It introduces the following fixes:

  • #35250 - as it turns out, in certain scenarios the tray icon for PowerToys Awake would not display. The app itself would still run in the background but because the call to the Windows API resulted in an error, users thought that PowerToys Awake crashed. This should no longer be the case because I’ve introduced retry logic.
  • #35848 - the new release also fixed a bug where custom tray time shortcuts for longer than 24 hours would be interpreted as zero hours/zero minutes because of how the time span was parsed.
  • #34716 - in cases where explorer.exe crashes (and that can happen), by default the PowerToys Awake icon would not recover. The root cause for that is the fact that the application was using a message-only window to manage the tray icon, which would never receive the message from Windows that the tray icon needs to be re-initialized. This has been addressed by moving away from a message-only window - I am using a standard hidden window now.
  • Added configuration safeguards to make sure that invalid values for timed keep-awake times do not result in exceptions. A bad value won’t crash the application now.
  • Updated the tray initialization logic, making sure we wait for it to be properly created before setting icons. This avoids some race conditions, where the icon change was attempted before the application fully launched.
  • Expanded logging capabilities to track invoking functions. This helps me diagnose any future bugs because I know which function was at the top of the stack.
  • Added command validation logic to make sure that incorrect command line arguments display an error.
  • Display state now shown in the tray tooltip. You don’t need to open PowerToys settings to see what “wakeness” state your PC is in.
  • When timed mode is used, changing the display setting will no longer reset the timer. That is, say you changed your mind one and a half hours into your three hour “wakeness,” and want to keep the display off while the system is still awake. Now, making this change is possible without having to re-time your settings.

Conclusion #

That’s it for now! If you encounter any bugs, do report them on GitHub. You can assign them to me (my GitHub alias is dend), and tag them as Product-Awake. This makes it easier for me to triage the issues quickly.